[#assign menucode="mySign"]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1">
<title>我的签约</title>
<link href="/res/css/respective/priceAsk/buyer.css" rel="stylesheet">
<style>
div.ppBase a{
	color:#00b1db;
}
div.ppBase a:hover{
	color:#00ceff;
}
</style>
</head>
<body> 
	<div class="warp">
		[#include "/front/common/front_headAzt.html"]
		<div class="backcontent">
			[#include "/front/common/front_leftAzt.html"]
			<div class="back-main">
				<div class="mainContent">
					<div class="mainContentWhite"> 
						<h1>我的签约</h1>
						<hr />
						<div class="ppBase">
						[#if member??]
							<h1 class="ppH1" style="margin-top: 0px; margin-bottom: 7px;">基础信息</h1>
							<div class="baseInfo">
									[#--<div>
										<dfn>
											供应商名称：<span>${member.companyName!}</span>
										</dfn>
									</div>--]
									<div>
										<dfn>
											签约日期：<span>${member.signintime?string("yyyy-MM-dd")!}</span>
										</dfn>
										<dfn>
											结束日期：<span>${member.endtime?string("yyyy-MM-dd")!}</span>
										</dfn>
									</div>
									<div>
										<dfn>
											联系人：<span>${member.contacts!}</span>
										</dfn>
										<dfn>
											联系电话：<span>${member.phone!}</span>
										</dfn>
									</div>
							</div>
							<h1 class="ppH1">返点协议</h1>
							<table class="table noBorder" id="fdTable">
								<thead>
									<tr>
										<th style="width: 10%;">阶段</th>
										<th style="width: 20%;">目标销售额</th>
										<th style="width: 30%;">当前销售额</th>
										<th style="width: 20%;">返点比例</th>
										<th style="width: 20%;">需返点金额</th>
									</tr>
								</thead>
								<tbody>
									[#assign lastIndex = -1]
									[#if (details?size>0)]
										[#list details as d]
										[#if lastIndex < 0 && d.isFull != 1]
											[#assign lastIndex = d_index]
										[/#if]
										<tr>
											<td>第${d.stage!}阶段</td>
											<td class="orgBold">￥${d.maxNum?string('0.00')!}</td>
											<td class="progra" style="padding:30px 0px;" [#if d.isFull == 1 || lastIndex == d_index]data-precent="${d.precent!}"[/#if]>
												<span>
													<span [#if d.isFull == 1 || lastIndex == d_index]style="width: ${d.precent*100!}%;"[/#if]>
														<span class="img">
															<img src="/res/images/dataCalc/progra_03.jpg" alt="" />
															<small>[#if d.isFull==1]￥${d.maxNum?string('0.00')!}[#elseif lastIndex == d_index]￥${jytotal?string('0.00')}[#else][/#if]</small>
														</span>
													</span>
												</span>
											</td>
											<td>${d.pointPercent?string('0.######')!}%</td>
											<td class="orgBold">
												[#if d_index==0]
													￥[#if d.isFull==1]${(d.maxNum*d.pointPercent/100)?string('0.00')}[#else]0.00[/#if]
												[#else]
													￥[#if d.isFull==1]${((d.maxNum-d.minNum)*d.pointPercent/100)?string('0.00')}[#else]0.00[/#if]
												[/#if]
											</td>
										</tr>
										[/#list]
									[#else]
										 <tr>
											<td colspan="5">暂无策略</td>
										</tr>
									[/#if]
								</tbody>
							</table>

							<h1 class="ppH1" style="margin-top: 20px;">商品集采价</h1>
							<table class="table noBorder">
								<thead>
									<tr>
										<th style="width: 50%;padding-left: 15px;text-align: left;">商品名称</th>
										<th style="width: 15%;">市场价</th>
										<th style="width: 15%;">会员价</th>
										<th style="width: 20%;">集采价格 </th>
									</tr>
								</thead>
								<tbody>
									[#if productList?? && productList?size > 0]
									   [#list productList as pro]
											<tr>
												<td class="mySign">
													<div>
														<a target="_blank" style="vertical-align: top;" href="/offer/${pro.id!}.html">${pro.name!}</a>
														<em>${pro.skuList[0].skuStr!}</em>
														<p>
															<img src="[#if pro.picPath??]${pro.picPath?split(';')[0]}[/#if]" onclick="window.open('/offer/${pro.id!}.html')" style="cursor: pointer;">
														</p>
													</div>
												</td>
												<td class="bold">￥${pro.skuList[0].price!}</td>
												<td>￥${pro.skuList[0].memberPrice?string('0.00')!}</td>
												<td class="orgBold">￥${pro.skuList[0].cenPrice?string('0.00')!}
													<div class="inlDiv">
														<img src="/res/images/dataCalc/book_03.png" alt="" />
														<div>
														<img src="/res/images/arrow/icon_11.png"/>
															<table class="table noBorder">
																<thead>
																	<tr>
																		<td width="50%">属性</td>
																		<td width="25%">会员价（元）</td>
																		<td width="25%">集采价（元）</td>
																	</tr>
																</thead>
																<tbody>
																	[#list pro.skuList as sku]
																	<tr>
																		<td style="font-weight: normal;">${sku.skuStr!}</td>
																		<td class="orgBold">${sku.memberPrice?string('0.00')!}</td>
																		<td class="orgBold">${sku.cenPrice?string('0.00')!}</td>
																	</tr>
																	[/#list]
																</tbody>
															</table>
														</div>
													</div>
												</td>
											</tr>
										[/#list]
									[#else]
										<tr>
											<td align="center" colspan="4">暂无集采商品</td>
										</tr>
									[/#if]
								</tbody>
							</table>
						[#else]
							<img style="display: block; margin: 10px auto;margin-top: 40px;" src="/res/images/error/unsign.png" alt="" />
							<p style="text-align: center; margin-top: 10px;">您尚未签约成集采供应商，<a target="_blank" href="/member/apply">了解更多>></a></p>
						[/#if]
						</div>
					</div>
				</div>
			</div>
			[#include "/front/common/front_footerAzt.html"]
		</div>
	</div>
</body>
<script>
	$(function() {
		$.each($('#fdTable tbody td.progra'), function() {
			var percent = $(this).attr('data-precent');
			$(this).find('.img').css('left', ($(this).width() * percent - 7) + 'px');

        });
		$(".inlDiv").hover(function(){
			$(this).children("div").show();
		},function(){
            $(this).children("div").hide();
		});
		
		$(".inlDiv>div").each(function(){
			$(".inlDiv>div").mouseleave(function(){
				$(".inlDiv>div").hide();
			});
		})  
	})
</script>
</html>